import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { id } from 'element-plus/es/locale';

/**
 * 新建审计/审查
 */
export function addAudit(data:any) {
  return request({
    url: '/api/audit',
    method: 'post',
    data: data
  });
}

/**
 * 编辑审计/审查
 */
export function updataAudit(data:any) {
  return request({
    url: '/api/audit/' + data.id ,
    method:'put',
    data:data
  });
}

/**
 * 删除审计/审查
 */
export function deleteAudit(data:any) {
  return request({
    url: '/api/audit/'+data.id,
    method: 'delete'
  });
}

/**
 * 获取我的审查/审计列表
 */
export function getAuditMyList(data:any) {
  return request({
    url: '/api/audit/my' ,
    method: 'get',
	params:data
  });
}

/**
 * 获取审查/审计详情
 */
export function getAudit(data:any) {
  return request({
    url: '/api/audit/'+ data.id ,
    method: 'get',
	params:data
  });
}

/**
 * 获取待审核 审查/审计详情
 */
export function getAuditCheck_list(data:any) {
  return request({
    url: '/api/audit/check_list',
    method: 'get',
	params:data
  });
}

/**
 * 审核
 */
export function pushAuditCheck(data:any) {
  return request({
    url: '/api/audit/check/' + data.id,
    method: 'post',
	data:data
  });
}


/**
 * 审查/审计中心 列表
 */
export function getAuditList(data:any) {
  return request({
    url: '/api/audit',
    method: 'get',
	params:data
  });
}
/**
 * 审查/审计中心 列表
 */
export function pullAuditStatus(data:any) {
  return request({
    url: 'audit/status/' + data.id,
    method: 'post',
	data:data
  });
}


/**
 * 新建台账
 */
export function addLedger(data:any) {
  return request({
    url: '/api/ledger',
    method: 'post',
	data:data
  });
}

/**
 * 编辑台账
 */
export function updataLedger(data:any) {
  return request({
    url: '/api/ledger/' + data.id ,
    method:'put',
    data:data
  });
}

/**
 * 台账列表
 */
export function getLedgerList(data:any) {
  return request({
    url: '/api/ledger',
    method:'get',
    params:data
  });
}
/**
 * 删除台账
 */
export function deleteLedger(data:any) {
  return request({
    url: '/api/ledger',
    method: 'delete',
	params:data
  });
}
/**
 * 台账详情
 */
export function getLedgerDetail(data:any) {
  return request({
    url: '/api/ledger/' + data.id,
    method:'get'
  });
}
/**
 * 新增进度
 */
export function addLedgerSchedule(data:any) {
  return request({
    url: '/api/ledger/schedule',
    method:'post',
	data:data
  });
}
/**
 * 编辑进度
 */
export function updataLedgerSchedule(data:any) {
  return request({
    url: '/api/ledger/schedule/'+data.id,
    method:'put',
	data:data
  });
}
/**
 * 删除进度
 */
export function deleteLedgerSchedule(data:any) {
  return request({
    url: '/api/ledger/schedule',
    method: 'delete',
	params:data
  });
}

/**
 * 进度列表
 */
export function getLedgerSchedulelList(data:any) {
  return request({
    url: '/api/ledger/schedule',
    method:'get',
	params:data
  });
}
/**
 * 进度详情
 */
export function getLedgerSchedulelDetail(data:any) {
  return request({
    url: '/api/ledger/schedule/' + data.id,
    method:'get',
	params:data
  });
}
